import { Injectable } from '@angular/core';
import { SERVERS_NAME } from '../../../config/config';
import { HttpService } from '../../../core/http.service';
import { CommHttpService } from '../../../core/comm.http.service';

@Injectable()
export class DoFeedbackService extends CommHttpService {


  protected preUrl = `${SERVERS_NAME.INSTITUTION_SERVER}feedback/`;

  constructor(protected http: HttpService) {
    super(http);
  }

  /**
   * 分页
   */
  pageExecute(data) {
    return this.http.post(data, this.preUrl + 'pageExecute');
  }

  /**
   * 获取教师
   */
  getTeachList(data) {
    return this.http.post(data, `${SERVERS_NAME.SECURITY_SERVER}sys/teacher/list`);
  }

  /**
   * 开始反馈
   */
  saveFeed(data) {
    return this.http.post(data, this.preUrl + 'save');
  }

  /**
   * 获取反馈明细
   */
  getCheckFeedBacks(data) {
    return this.http.post(data, this.preUrl + 'getCheckFeedBack');
  }

  /**
   * 获取制度
   */
  view(data) {
    return this.http.post(data, this.preUrl + 'view');
  }

  /**
   * 学生审核--查询学院列表
   */
  getCollege() {
    return this.http.post({}, `${SERVERS_NAME.SECURITY_SERVER}` + 'sys/college/listCollege');
  }

  /**
   * 查询部门
   */
  getDept() {
    return this.http.get({}, `${SERVERS_NAME.SECURITY_SERVER}` + 'sys/dept/list');
  }

  /**
   * 获取当前用户的部门领导
   */
  getCurrentLeader() {
    return this.http.get({}, `${SERVERS_NAME.SECURITY_SERVER}` + 'sys/dept/getCurrentLeader');
  }
}
